1. Field of the Invention
This invention relates to computer network communications, and more specifically to a method and apparatus for network transport independence.
Portions of the disclosure of this patent document contain material that is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure as it appears in the Patent and Trademark Office file or records, but otherwise reserves all copyright rights whatsoever.
2. Background Art
Computers are used to send and receive data with other computers. The Internet is one example of a transport mechanism and other examples include local area networks (LANs) and wide area networks (WANs). Using a network, a software application (a sender) that resides on one computer system can exchange information with another application (a receiver) that resides on a remote computer system, for example. Information is sent via a network in the form of a message. A communication protocol specifies the format of a message.
There are different types of communication protocols each of which has a unique message format. For example, asynchronous transfer mode (ATM), hypertext transfer protocol (HTTP), user datagram protocol (UDP), transmission control protocol (TCP) and real time transport protocol (RTP) each have its own message format.
In a network environment, it may be necessary for the sender and/or receiver to be able to understand more than one communication protocol""s message format. For example, a receiver may receive messages from different senders that have different message formats. Further, a single message may be composed using multiple message format. For example, an RTP message may be embedded in a TCP message. The receiver must be able to understand both the TCP and RTP message formats to extract the data contained in the message.
To process a message, a software application must include one or more modules that can parse the message format and extract the information contained in the message. Such modules are needed for each message format that the software application is likely to encounter. This adds to the complexity of the software application which negatively impacts the development and maintenance costs associated with a software application.
Embodiments of the invention make the underlying transport mechanism transparent to the sender and/or receiver. Using embodiments of the invention, it is not necessary for a sender or receiver to interface with the transport mechanism. Messages are received in a single format which eliminates the need for the sender or receiver to accommodate multiple message formats.
A socket mechanism implements bi-directional transmissions and acts as a buffer between the sender or receiver and the underlying transport mechanism. The socket mechanism interfaces with a transport delivery mechanism that receives packets from the physical network. The socket forwards messages received from the transport delivery mechanism to a message processor. Further, the socket forwards messages from the message processor to the transport delivery mechanism. The transport delivery mechanism removes the transport header from messages received off the network and adds a transport header to messages to be sent over the network.
In one embodiment of the invention, the socket mechanism is comprised of a data channel and a control channel such as those used in an RTP environment. Both the data channel and the control channel include an input stream and an output stream. The input and output streams are push data streams such that the data sender (an originator of the data located on the same or a different host) initiates and controls the flow of the data being transmitted. The socket mechanism interfaces with an RTP session manager (RTPSM), that acts as a message processor in this embodiment, and the transport delivery mechanism
A set of object classes are used in one embodiment of the invention to implement the socket mechanism comprised of data and control channels. An RTPIODataSource object class implements the control channel. A subclass of the RTPIODataSource object class, an RTPSocket class, implements the data channel. The RTPIODataSource and RTPSocket provide bi-directional data flow that can receive data for as well as receive data from the RTPSM.
The data and control channels each contain an output stream that implement a PushSourceStream interface and an input stream that implements a PushDestStream interface. The output stream sources data from the underlying transport mechanism to the RTPSM while the input stream receives data from the RTPSM and forwards it to the underlying delivery mechanism. In this manner all details of the underlying transport are hidden from the RTPSM.